package com.cavy.platform.server.repository;


import com.cavy.platform.server.ResultList;
import com.cavy.platform.server.domain.Plugin;
import com.cavy.platform.server.dto.PluginSearchDto;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;

public interface PluginRepository {
    long countByName(String name, String version);

    void create(Plugin plugin) throws IOException;

    void delete(String name, String version);

    ResultList list(PluginSearchDto dto);

    String[] listByDto(PluginSearchDto dto);

    String[] getVersionList(String name);

    Plugin info(String name, String version) throws IOException;

    File getLogo(String name, String lastVersion);

    void deleteInfo(String name, String version);

    void refresh();

    void saveLogo(String name, String version, MultipartFile file);
}
